/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.designPatterns.model;
import java.util.Date;
/**
 *
 * @author minga
 */
public class Singleton {
   private static  Singleton theOnlyOne;
   private Date d = new Date();

    public Singleton() {
    }
    public synchronized static Singleton instance()
    {
        if(theOnlyOne==null)
        {
            theOnlyOne = new Singleton();
        }
        return theOnlyOne;
    }

    public Date getD() {
        return d;
    }
    
}
